package wfl.spec.edu;

import android.support.v7.app.AppCompatActivity;
import android.os.Bundle;
import android.support.v7.widget.LinearLayoutManager;
import android.support.v7.widget.RecyclerView;
import android.widget.Adapter;
import android.widget.LinearLayout;

import java.util.ArrayList;
import java.util.List;

public class ActivityThird extends AppCompatActivity {
    private List<wechat3> wechat3List=new ArrayList<>();

    @Override
    protected void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.activity_third);
        initwechat3();
        RecyclerView recyclerView=(RecyclerView) findViewById(R.id.recycler_view);
        LinearLayoutManager layoutManager=new LinearLayoutManager(this);
        layoutManager.setOrientation(LinearLayoutManager.HORIZONTAL);
        recyclerView.setLayoutManager(layoutManager);
        wechatAdapter3 adapter3=new wechatAdapter3(wechat3List);
        recyclerView.setAdapter(adapter3);
    }

    private void initwechat3() {
        for(int i=0;i<2;i++){
            wechat3 wc1=new wechat3(R.drawable.jb,"济南7.77...");
            wechat3List.add(wc1);
            wechat3 wc2=new wechat3(R.drawable.jc,"我是腾腾爸");
            wechat3List.add(wc2);
            wechat3 wc3=new wechat3(R.drawable.jd,"川幼应用");
            wechat3List.add(wc3);
            wechat3 wc4=new wechat3(R.drawable.jh,"交易军师");
            wechat3List.add(wc4);
            wechat3 wc5=new wechat3(R.drawable.jb,"济南7.77...");
            wechat3List.add(wc5);
            wechat3 wc6=new wechat3(R.drawable.jc,"我是腾腾爸");
            wechat3List.add(wc6);
            wechat3 wc7=new wechat3(R.drawable.jd,"川幼应用");
            wechat3List.add(wc7);
            wechat3 wc8=new wechat3(R.drawable.jh,"交易军师");
            wechat3List.add(wc8);
            wechat3 wc9=new wechat3(R.drawable.jb,"济南7.77...");
            wechat3List.add(wc9);
        }
    }
}
